#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2019, Intel Corporation
#
#
# pmempool_sync_remote/TEST0 -- pmempool sync with remote replication
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type any

. common.sh

configure_poolsets 1 1

dump_info_log 1 0 ${NODE_DIR[1]}$POOLSET_LOCAL before.0.log
dump_info_log 1 1 ${NODE_DIR[1]}$POOLSET_LOCAL before.1.log

expect_normal_exit run_on_node 1 ../pmempool sync ${NODE_DIR[1]}$POOLSET_LOCAL

dump_info_log 1 0 ${NODE_DIR[1]}$POOLSET_LOCAL after.0.1.log
dump_info_log 1 1 ${NODE_DIR[1]}$POOLSET_LOCAL after.1.1.log

diff_log 1 before.0.log after.0.1.log
diff_log 1 before.1.log after.1.1.log

pass
